Skip to content

Create schema
deprecated

Request

The API allows the creation of a new schema for the given kind. Required roles: 'users.datalake.editors' or 'users.datalake.admins'.

Security
bearer
Headers
data-partition-idstringrequired

desired data partition id

Bodyapplication/json
kindstringrequired

Record kind for which the schema information is applied to.

Example:"slb-osdu-prod-des-prod-testing:wks:work-product-component--WellLog:1.0.0"
schemaArray of objects(SchemaItem)required

List of schema items which compose the schema.

Example:
[ { "path": "msg", "kind": "string", "ext": {} }, { "path": "year", "kind": "int", "ext": {} }, { "path": "weight", "kind": "float", "ext": {} }, { "path": "location", "kind": "core:dl:geopoint:1.0.0", "ext": {} }, { "path": "valid", "kind": "bool", "ext": {} } ]
extobject

Extension field for custom schema definition.

curl -i -X POST \
  https://as5.api.enterprisedata.slb.com/api/storage/v2/schemas \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'data-partition-id: string' \
  -d '{
    "kind": "slb-osdu-prod-des-prod-testing:wks:work-product-component--WellLog:1.0.0",
    "schema": [
      {
        "path": "msg",
        "kind": "string",
        "ext": {}
      },
      {
        "path": "year",
        "kind": "int",
        "ext": {}
      },
      {
        "path": "weight",
        "kind": "float",
        "ext": {}
      },
      {
        "path": "location",
        "kind": "core:dl:geopoint:1.0.0",
        "ext": {}
      },
      {
        "path": "valid",
        "kind": "bool",
        "ext": {}
      }
    ]
  }'

Responses

Schema created successfully.

Response
No content